﻿<UserControl x:Class="ViCode_LeVi.Controls.VMTabTaskItemDetail"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:vmcontrol="clr-namespace:ViCode_LeVi.Controls"
        xmlns:Langs="clr-namespace:ViCode_LeVi.Langs"
        xmlns:Data="clr-namespace:ViCode_LeVi.Data">
    <vmcontrol:VMRootControl>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>

            <StackPanel Grid.Column="0" Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center">
                <vmcontrol:VMTextBlock Text="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=TextBlock_Filter_Task_Text}" Margin="2"/>
                <ComboBox Name="ComboBox_TaskType"
                       DisplayMemberPath="Name" 
                MinWidth="100" Margin="2" VerticalAlignment="Center"/>
            </StackPanel>

            <Grid Grid.Column="0" Grid.Row="1">
                <ListView Name="ListView_Tasks" Margin="2" ItemsSource="{Binding ElementName=ComboBox_TaskType, Path = SelectedItem.Tasks_Source}"
                      SelectionMode="Single">
                    <ListView.View>
                        <GridView>
                            <GridViewColumn DisplayMemberBinding="{Binding ID}">
                                <GridViewColumn.Header>
                                    <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="TaskItem_ID_Text"/>
                                </GridViewColumn.Header>
                            </GridViewColumn>
                            <GridViewColumn  DisplayMemberBinding="{Binding Name}">
                                <GridViewColumn.Header>
                                    <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="TaskItem_Name_Text"/>
                                </GridViewColumn.Header>
                            </GridViewColumn>
                            <GridViewColumn>
                                <GridViewColumn.Header>
                                    <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="TaskItem_IsActive_Text"/>
                                </GridViewColumn.Header>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <CheckBox IsChecked="{Binding Active}"      VerticalAlignment="Center"  />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn x:Name="GridViewColumn_Quantity" >
                                <GridViewColumn.Header>
                                    <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="TaskItem_Quantity_Text"/>
                                </GridViewColumn.Header>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding Quantity_WeightPercent}"    VerticalAlignment="Center"  HorizontalAlignment="Right"  Margin="0,0,2,0" />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn >
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <Image Width="{Binding ImageWidth}" Height="{Binding ImageHeight}"  Source="{Binding Quantity_Evaluation_Image}"    VerticalAlignment="Center"  />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn x:Name="GridViewColumn_Quanlity" >
                                <GridViewColumn.Header>
                                    <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="TaskItem_Quanlity_Text"/>
                                </GridViewColumn.Header>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding Quanlity_WeightPercent}"    VerticalAlignment="Center"  HorizontalAlignment="Right" Margin="0,0,2,0"  />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                            <GridViewColumn >
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <Image Width="{Binding ImageWidth}" Height="{Binding ImageHeight}"  Source="{Binding Quanlity_Evaluation_Image}"    VerticalAlignment="Center"  />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                            <GridViewColumn x:Name="GridViewColumn_Systematic"  >
                                <GridViewColumn.Header>
                                    <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="TaskItem_Systematic_Text"/>
                                </GridViewColumn.Header>
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <TextBlock Text="{Binding Systematic_WeightPercent}"    VerticalAlignment="Center"  HorizontalAlignment="Right" Margin="0,0,2,0"  />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>
                            <GridViewColumn >
                                <GridViewColumn.CellTemplate>
                                    <DataTemplate>
                                        <Image Width="{Binding ImageWidth}" Height="{Binding ImageHeight}"  Source="{Binding Systematic_Evaluation_Image}"    VerticalAlignment="Center"  />
                                    </DataTemplate>
                                </GridViewColumn.CellTemplate>
                            </GridViewColumn>

                        </GridView>
                    </ListView.View>
                </ListView>
            </Grid>

            <StackPanel Grid.Row="2" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
                <Button Name="Button_Detail" Margin="2" Content="{Binding Source={x:Static Langs:ControlTextInfo.Intance}, Path=Button_Content_Detail}"/>
            </StackPanel>
        </Grid>
    </vmcontrol:VMRootControl>
</UserControl>
